let sDiv=document.querySelectorAll('.selectDiv')
let sUl=document.querySelectorAll('.selectUl')
let zhuangtai=true
    sDiv.children[1].addEventListener('click',function(){
        if(zhuangtai){
            sUl.style.display='block';
            sUl.style.marginTop='0';
            for(let i=0;i<sUl.children.length;i++){
                if(sDiv.children[0].innerText==sUl.children[i].innerText){
                    sUl.children[i].style.backgroundColor='rgb(137, 196, 223)';
                    zhuangtai=false;
                    return;
                }
                sUl.children[i].onmouseover=function(){
                    for(let i=0;i<sUl.children.length;i++){
                        sUl.children[i].style.backgroundColor='white'
                    }
                    sUl.children[i].style.backgroundColor='rgb(137, 196, 223)'
                }
                sUl.children[i].onmouseout=function(){
                    sUl.children[i].style.backgroundColor='rgb(137, 196, 223)';
                }
            }
            zhuangtai=false;
            return;
        }
        sUl.style.display='none';
        for(let i=0;i<sUl.children.length;i++){
            
        }
        zhuangtai=true;
    })
    sUl.onclick=function(){
        if(event.target.tagName=='LI'){
            sUl.style.display='none';
            sDiv.children[0].innerText=event.target.innerText;
        }
    }